import java.io.IOException;
import java.net.Socket;
import java.util.Scanner;

public class Link {
    private Socket socket;
    private String name;
    public Link() {
        try{
            Scanner scanner=new Scanner(System.in);
            System.out.println("请输入用户名");
            name=scanner.nextLine();
            socket=new Socket("39.105.180.238",8088);
            System.out.println("连接成功");






        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public Socket getSocket() {
        return socket;
    }

    public void setSocket(Socket socket) {
        this.socket = socket;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
